#ifndef MESSAGETABLE_H
#define MESSAGETABLE_H

#include "converse/converseabstractconversation.h"
#include "converse/converseabstractmessage.h"

#include <QObject>

using namespace Converse;


namespace Sqlite {

class MessageTable : public QObject
{
    Q_OBJECT
public:
    explicit MessageTable(QObject *parent = 0);

    static void createTable();
    static void clearTable();
    static void insertMessage(const Converse::AbstractMessage* message);
    static void updateMessageIsRead(const Converse::AbstractMessage* message);
    static void updateMessageIsSent(const Converse::AbstractMessage* message);

    static void getMessageFromLocal(const qint64 uid,
                                    const qint64 fid,
                                    const qint64 numMessage,
                                    const qint64 messageID,
                                    AbstractConversation *conversation);
};

}

#endif // MESSAGETABLE_H
